package com.ciwong.epaper.modules.me.bean;

import android.support.annotation.NonNull;

import com.ciwong.mobilelib.bean.BaseBean;

import java.util.List;

public class MaterialBean extends BaseBean implements Comparable<MaterialBean> {
    /**
     * books : [{"bookId":2743,"bookName":"xpj测试环境书1"},{"bookId":3162,"bookName":"听说模考"},{"bookId":3164,"bookName":"听说模考-副本"},{"bookId":2904,"bookName":"xpj图片书1"},{"bookId":2953,"bookName":"七年级下册同步听力训练"}]
     * gradeId : 1107
     * gradeName : 七年级
     * semester : 1201
     * versionId : 327
     * versionName : 人教版
     */

    private int gradeId;
    private String gradeName;
    private int versionId;
    private int serverId;
    private int isFree;
    private int packageIsFree;
    private String expire_time;
    private String versionName;
    private int required;
    private List<BooksBean> books;
    private BooksPage booksPage;

    public BooksPage getBooksPage() {
        return booksPage;
    }

    public void setBooksPage(BooksPage booksPage) {
        this.booksPage = booksPage;
    }

    /**
     * 添加 循环归类标记lzh
     */
    private boolean isclassified;

    /**
     * 添加选中状态lzh
     */
    //当前选中的
    private boolean isSelected;

    public int getRequired() {
        return required;
    }

    public void setRequired(int required) {
        this.required = required;
    }

    public boolean isClassified() {
        return isclassified;
    }

    public void setIsClassified(boolean isclassified) {
        this.isclassified = isclassified;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }


    public int getGradeId() {
        return gradeId;
    }

    public void setGradeId(int gradeId) {
        this.gradeId = gradeId;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }


    public int getVersionId() {
        return versionId;
    }

    public void setVersionId(int versionId) {
        this.versionId = versionId;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public List<BooksBean> getBooks() {
        return books;
    }

    public void setBooks(List<BooksBean> books) {
        this.books = books;
    }

    public int getServerId() {
        return serverId;
    }

    public void setServerId(int serverId) {
        this.serverId = serverId;
    }

    public int getIsFree() {
        return isFree;
    }

    public void setIsFree(int isFree) {
        this.isFree = isFree;
    }

    public String getExpire_time() {
        return expire_time;
    }

    public void setExpire_time(String expire_time) {
        this.expire_time = expire_time;
    }

    public int getPackageIsFree() {
        return packageIsFree;
    }

    public void setPackageIsFree(int packageIsFree) {
        this.packageIsFree = packageIsFree;
    }

    @Override
    public int compareTo(@NonNull MaterialBean o) {
        if (this.gradeId > o.gradeId)
            return 1;
        else if (this.gradeId < o.gradeId)
            return -1;
        else
            return 0;
    }

    public static class BooksBean extends BaseBean {
        /**
         * bookId : 2743
         * bookName : xpj测试环境书1
         */

        private int bookId;
        private String bookName;

        public int getBookId() {
            return bookId;
        }

        public void setBookId(int bookId) {
            this.bookId = bookId;
        }

        public String getBookName() {
            return bookName;
        }

        public void setBookName(String bookName) {
            this.bookName = bookName;
        }
    }
}